<% if(session[:user_id]==nil) %>
  <h4><%= t :dangnhapthuchien %></h4>
  <br/>
  <p><%= link_to "=> #{t :dangnhap}", login_path %></p>
<%else%>


<h3><%= t :themnuocmoi%></h3>
<br/>
<%= form_for(@product) do |f| %>
  <% if @product.errors.any? %>
	<div id="error_explanation">
	  <h4><%= pluralize(@product.errors.count, "error") %> :</h4>

	  <ul>
	  <% @product.errors.full_messages.each do |msg| %>
		<li><%= msg %></li>
	  <% end %>
	  </ul>
	</div>
  <% end %>
  <div class="field">
	<%= f.label :Name, "#{t :tensanpham}" %>
	<%= f.text_field :Name %>
  </div>
  

  <% if false%>
  <div class="field">
	<%= f.label :Description, "#{t :mota}" %>
	<%= f.text_field :Description %>
  </div>
  <%end%>

  <div class="field">
  <%= f.label :Description, "#{t :mota}" %>
  <%= raw f.text_area :Description, :size => "120x12" %>
  </div>

  <div class="field">
  	<% @category= Category.find(:all, :order => 'Name') %>
	<%= f.label :category_id,"#{t :theloai}" %>
	<%= f.select :category_id, @category.map {|p| [ p.Name, p.id ] } , { :include_blank => true } %>
  </div>
  
  
  <div class="actions">
	<%= f.submit "#{t :themnuocmoi}" %>
  </div>
<% end %>
<%end%>